package cn.ulc.store.dao.goods;
import cn.ulc.common.constant.enums.AvailableStatus;
import cn.ulc.store.dao.BaseDao;
import cn.ulc.store.entity.goods.*;

import org.beetl.sql.core.annotatoin.SqlResource;
import org.beetl.sql.core.engine.PageQuery;

import java.util.List;

/*
* Goods
* gen by Jin mapper 2019-05-28
*/
@SqlResource("goods.goods")
public interface GoodsDao extends BaseDao<Goods> {

    Goods findById(Long id);

    Goods findByBarCode(Long companyId,String barCode);

    PageQuery findListPage(PageQuery pageQuery);

    /**
     * 小程序商品列表查询接口
     * @param pageQuery
     * @return
     */
    PageQuery findWxListPage(PageQuery pageQuery);

    Long findCountByType(Long typeId);

    Long findCountByUnit(Long unitId);

    List<Goods> findByParentTypeId(Long companyId, Long parentId, AvailableStatus status,String date);

}
